package com.maybach.core.manager;

import com.maybach.util.query.support.PageResult;
import com.maybach.common.model.CarDO;
import com.maybach.common.query.CarQuery;

import java.util.List;


/**
 * Manager for Car.
 */
public interface CarManager {
    /**
     * query count by query condition.
     */
    int countByQuery(CarQuery query);

    /**
     * delete by query condition.
     */
    int deleteByQuery(CarQuery query);

    /**
     * delete by primary key.
     */
    int deleteByPrimaryKey(CarDO record);

    /**
     * insert selective.
     */
    long insertSelective(CarDO record);

    /**
     * select by query condition.
     */
    List<CarDO> selectByQuery(CarQuery query);


    /**
     * select by query condition with page.
     */
    PageResult<CarDO> selectByQueryWithPage(CarQuery query);

    /**
     * select by primary key.
     */
    CarDO selectByPrimaryKey(Long id);

    /**
     * update by query condition selective.
     */
    int updateByQuerySelective( CarDO record,  CarQuery query);

    /**
     * update by query condition.
     */
    int updateByQuery(CarDO record, CarQuery query);

    /**
     * update by primary key selective.
     */
    int updateByPrimaryKeySelective(CarDO record);
}